package com.zifuchuan.stringtest;

import com.zifuchuan.domain.Student;

import java.util.Scanner;

public class Test05 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入'张三 , 23'这样的字符串");
        String s = sc.nextLine();
        String[] studentinfo = s.split(",");
        String name=  studentinfo[0];
        String age=  studentinfo[1];
        String address=  studentinfo[2];
        Student student = new Student(name,age,address);
        System.out.println(student);

    }
}
